package org.pim.smart.hibernate.domain;

/**
 * AbstractTagContactMapId entity provides the base persistence definition of
 * the TagContactMapId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public abstract class AbstractTagContactMapId implements java.io.Serializable {

	// Fields

	private Integer contactMainOid;
	private Integer tagOid;

	// Constructors

	/** default constructor */
	public AbstractTagContactMapId() {
	}

	/** full constructor */
	public AbstractTagContactMapId(Integer contactMainOid, Integer tagOid) {
		this.contactMainOid = contactMainOid;
		this.tagOid = tagOid;
	}

	// Property accessors

	public Integer getContactMainOid() {
		return this.contactMainOid;
	}

	public void setContactMainOid(Integer contactMainOid) {
		this.contactMainOid = contactMainOid;
	}

	public Integer getTagOid() {
		return this.tagOid;
	}

	public void setTagOid(Integer tagOid) {
		this.tagOid = tagOid;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AbstractTagContactMapId))
			return false;
		AbstractTagContactMapId castOther = (AbstractTagContactMapId) other;

		return ((this.getContactMainOid() == castOther.getContactMainOid()) || (this
				.getContactMainOid() != null
				&& castOther.getContactMainOid() != null && this
				.getContactMainOid().equals(castOther.getContactMainOid())))
				&& ((this.getTagOid() == castOther.getTagOid()) || (this
						.getTagOid() != null
						&& castOther.getTagOid() != null && this.getTagOid()
						.equals(castOther.getTagOid())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getContactMainOid() == null ? 0 : this.getContactMainOid()
						.hashCode());
		result = 37 * result
				+ (getTagOid() == null ? 0 : this.getTagOid().hashCode());
		return result;
	}

}